package com.csj.DesignPattern.singleton.demo7;

import java.io.IOException;
import java.lang.reflect.InvocationTargetException;


//反射破坏单例，创建的对象不是同一个
public class main {
    public static void main(String[] args) throws NoSuchMethodException, InvocationTargetException, InstantiationException, IllegalAccessException, IOException {
        /*Class<Singleton> clazz = Singleton.class;
        Constructor<Singleton> constructor = clazz.getDeclaredConstructor();
        constructor.setAccessible(true);

        OperatingSystem.out.println(constructor.newInstance());
        OperatingSystem.out.println(constructor.newInstance());

        Class<SingletonReadResolve> clazz1 = SingletonReadResolve.class;
        Constructor<SingletonReadResolve> constructor1 = clazz1.getDeclaredConstructor();
        constructor1.setAccessible(true);

        OperatingSystem.out.println(constructor1.newInstance());
        OperatingSystem.out.println(constructor1.newInstance());*/

    }
}
